Where is this agent supposed to be running? On workstations or servers? What's thr trigger? An event or a schedule?
It's all well and good if it compiles and runs locally, but if it's supposed to run on the server, then you will hit the issues discussed earlier (security, class paths etc.)
Code going red in the programmers pane doesn't sound like a successful compile to me.
--
http://www.benpoole.com